IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[cms_sp_Content_Save]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[cms_sp_Content_Save]
GO

create procedure [dbo].[cms_sp_Content_Save]
(
	@Id int,	
	@SiteGroupId int = null,
	@SiteId int = null,
	@ContentTypeId int,
	@SystemLanguageId int = null,
	@ContentTitle nvarchar(250),
	@ContentSummary nvarchar(500) = null,
	@ContentBody nvarchar(max) = null,
	@ContentCode nvarchar(150) = null,
	@CreatedBy int,
	@DateCreated datetime,
	@LastUpdatedBy int = null,
	@DateLastUpdated datetime = null,
	@IsPublished bit = null,
	@PublishEndDate datetime = null, 
	@PublishStartDate datetime = null
)
as

update dbo.Contents
set
	SiteGroupId = @SiteGroupId,
	SiteId = @SiteId,
	SystemLanguageId = @SystemLanguageId,
	ContentTypeId = @ContentTypeId,
	ContentTitle = @ContentTitle,
	ContentSummary = @ContentSummary,
	ContentBody = @ContentBody,
	CreatedBy = @CreatedBy,
	DateCreated = @DateCreated
where ContentId = @Id


GO


